package model

import (
	"gorm.io/gorm"
	"time"
)

type Medium struct {
	Id        uint           `gorm:"column:id;type:bigint UNSIGNED;primaryKey;not null;" json:"id"`
	CreatedAt time.Time      `gorm:"column:created_at;type:datetime(3);default:NULL;" json:"created_at"`
	UpdatedAt time.Time      `gorm:"column:updated_at;type:datetime(3);default:NULL;" json:"updated_at"`
	DeletedAt gorm.DeletedAt `gorm:"column:deleted_at;type:datetime(3);default:NULL;" json:"deleted_at"`
	Photos    string         `gorm:"column:photos;type:varchar(200);default:NULL;" json:"photos"`
	Videos    string         `gorm:"column:videos;type:varchar(200);default:NULL;" json:"videos"`
	Files     string         `gorm:"column:files;type:varchar(200);comment:文件;default:NULL;" json:"files"`               // 文件
	CreatedBy uint           `gorm:"column:created_by;type:bigint UNSIGNED;comment:创建者;default:NULL;" json:"created_by"` // 创建者
	UpdatedBy uint           `gorm:"column:updated_by;type:bigint UNSIGNED;comment:更新者;default:NULL;" json:"updated_by"` // 更新者
	DeletedBy uint           `gorm:"column:deleted_by;type:bigint UNSIGNED;comment:删除者;default:NULL;" json:"deleted_by"` // 删除者
}

func (m *Medium) TableName() string {
	return "medium"
}
